package com.star.system.struct;

import com.star.system.dto.UserUpdateWxappDTO;
import com.star.system.dto.UserSaveDTO;
import com.star.system.dto.UserUpdateDTO;
import com.star.system.entity.User;
import org.mapstruct.Mapper;

/**
 * 用户转对象
 *
 * @author yangzj
 */
@Mapper
public interface UserStruct {
    UserStruct INSTANCE = org.mapstruct.factory.Mappers.getMapper(UserStruct.class);

    /**
     * to User
     *
     * @param dto dto
     * @return {@link User}
     */
    User to(UserUpdateWxappDTO dto);

    /**
     * to User
     *
     * @param dto dto
     * @return {@link User}
     */
    User to(UserSaveDTO dto);

    /**
     * to User
     *
     * @param dto dto
     * @return {@link User}
     */
    User to(UserUpdateDTO dto);
}
